import Vue from 'vue'
import Router from 'vue-router'
import Home from 'components/home/home'
import Column from 'components/column/column'
import ColumnList from 'components/column-list/column-list'
import Content from 'base/content/content'
import Detail from 'components/detail/detail'
// import Recommend from 'components/recommend/recommend'
// import Singer from 'components/singer/singer'
// import Rank from 'components/rank/rank'
// import Search from 'components/search/search'
// import SingerDetail from 'components/singer-detail/singer-detail'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      component: Home
    },
    {
      path: '/:columnName',
      component: Column,
      redirect: to => {
        return {path: `${to.params.columnName}/0`}
      },
      children: [
        {
          path: ':id',
          component: ColumnList,
          children: [
            {
              path: ':newId',
              component: Detail
            }
          ]
        }
      ]
    }
    // {
    //   path: '/about',
    //   component: About
    // },
    // {
    //   path: '/product',
    //   component: Product
    // },
    // {
    //   path: '/contact',
    //   component: Contact
    // },
    // {
    //   path: '/login',
    //   component: Login
    // },
    // {
    //   path: '/register',
    //   component: Register
    // }
  ]
})
